package com.lcxw.hxzbadmin.service.baseservice;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import com.lcxw.hxzbadmin.dao.adminmapper.GoodNameMapper;
import com.lcxw.hxzbadmin.entity.pojo.GoodName;

@Component
public class GoodNameService {

    @Resource
    GoodNameMapper goodNameMapper;

    public int deleteByPrimaryKey(Integer id)throws Exception{
        return  goodNameMapper.deleteByPrimaryKey(id);
    }

    public int insert(GoodName goodName)throws Exception{
        return goodNameMapper.insert(goodName);
    }

    public GoodName selectByPrimaryKey(Integer id)throws Exception{
        return goodNameMapper.selectByPrimaryKey(id);
    }

    public GoodName selectByName(String name)throws Exception{
        return goodNameMapper.selectByName(name);
    }

    public List<GoodName> selectAll()throws Exception{
        return goodNameMapper.selectAll();
    }

    public int updateByPrimaryKey(GoodName goodName) throws Exception{
        return goodNameMapper.updateByPrimaryKey(goodName);
    }
}
